/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package j2ee.impl;

import j2ee.J2eePackage;
import j2ee.MethodParamsType;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Method Params Type</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link j2ee.impl.MethodParamsTypeImpl#getMethodParam <em>Method Param</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class MethodParamsTypeImpl extends EObjectImpl implements MethodParamsType {
	/**
	 * The default value of the '{@link #getMethodParam() <em>Method Param</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getMethodParam()
	 * @generated
	 * @ordered
	 */
	protected static final String METHOD_PARAM_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getMethodParam() <em>Method Param</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getMethodParam()
	 * @generated
	 * @ordered
	 */
	protected String methodParam = METHOD_PARAM_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected MethodParamsTypeImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return J2eePackage.Literals.METHOD_PARAMS_TYPE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getMethodParam() {
		return methodParam;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setMethodParam(String newMethodParam) {
		String oldMethodParam = methodParam;
		methodParam = newMethodParam;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, J2eePackage.METHOD_PARAMS_TYPE__METHOD_PARAM, oldMethodParam, methodParam));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case J2eePackage.METHOD_PARAMS_TYPE__METHOD_PARAM:
				return getMethodParam();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case J2eePackage.METHOD_PARAMS_TYPE__METHOD_PARAM:
				setMethodParam((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case J2eePackage.METHOD_PARAMS_TYPE__METHOD_PARAM:
				setMethodParam(METHOD_PARAM_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case J2eePackage.METHOD_PARAMS_TYPE__METHOD_PARAM:
				return METHOD_PARAM_EDEFAULT == null ? methodParam != null : !METHOD_PARAM_EDEFAULT.equals(methodParam);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (methodParam: ");
		result.append(methodParam);
		result.append(')');
		return result.toString();
	}

} //MethodParamsTypeImpl
